import { getToken } from '@/utils/index.js'
import api from '@/api/index.js'
const state = {
	avatar: '',
	baseURL: 'https://app.fjxmlz.com/',
	isRealName: true,
	idCardForm: {}
}

const mutations = {
	getReal(state){
		api.getrealname().then(res => {
			state.idCardForm = res.data
			state.isRealName = false
		}).catch(err => {
			state.idCardForm = {}
			state.isRealName = true
		})
	},
	getImg(state){
		api.getLoginImage().then(res =>{
			console.log(res.data)
			state.avatar = res.data.image
		})
	}
}

const actions = {}

const getters = {}

export default {
	namespaced: true,
	state,
	mutations,
	actions,
	getters
}
